package controllerInterfaces;

import java.util.List;

import javax.swing.JPanel;

import modelInterfaces.ITest;
import viewInterfaces.IViewTestPanel;

/**
 * 
 * @author Andy Cullache
 *
 */
public interface IControllerTestsPanel{
	
	/**
	* Sets the main controller as controller of this class.
	* 
	* @param controllerMain      main controller class.
	*/
	public void SetMainController(IControllerMain controllerMain);
	
	/**
	 * Returns the JPanel that represents the view of this controller.
	 * 
	 * @return      panel the view of this controller.
	 */
	public JPanel getPanel();
	
	/**
	* Add a test to the tests list.
	* 
	* @param      tests to add.
	*/
	public void addTest(ITest test);
	
	/**
	* Returns the list of available tests, corresponds to the same list that appears in the benchmark panel.
	* 
	* @return      list of available tests.
	*/
	public List<ITest> getTests();
	
	/**
	* Remove a test to the tests list.
	* 
	* @param      tests to remove.
	*/
	public void removeTest(ITest test);
	
	/**
	* Instantiates the test configuration controller, sets lists of metric and algorithms to new controller.
	*/
	public void startTestSetup();
	
	/**
	* Creates a view with the values of the test that comes from parameter to be edited.
	* @param      test to edit.
	*/
	public void editTestSetup(ITest test);
	
	/**
	 * Updates the test list of test panel in view of this controller.
	 */
	public void updateTests();
	
	/**
	 * copy the test that this parameter.
	 * 
	 * @param      test to copy.
	 */
	public void copyTest(ITest selectedValue);

	
	/**
	 * Block all visual components of panel.
	 * @see ViewTestsPanel
	 */	
	public void blockAllComponents();


	/**
	 * UnBlock all visual components of panel.
	 * @see ViewTestsPanel.
	 */	
	public void unBlockAllComponents();
	
	/**
	* Loading the list of tests in the view
	* 
	*/
	public void loadTestsToView();
	
	
	/**
	 * Get status of DB connection.
	 * @return if true then database connection exists, otherwise, doesn't exist .
	 */
	public boolean getDBConnectedStatus();

	
	/**
	 * Get View of this controller</br>
	 * This method is only used for realize unit testing.
	 * @return IViewTestsPanel
	 */
	public IViewTestPanel GetView();
}
